package com.yjt.javatest.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor

public class Test {

  @TableId(value="test_id",type= IdType.AUTO)
  private Long testId;
  private Long userId;

  private String title;
  private String description;
  private Boolean isOrdered;
  @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  private Date startAt;//发布时间
  @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  private Date endAt;//结束时间
  @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  private Date answerReleaseAt;//公布时间
  @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  @JsonIgnore
  private Date createdAt;
  @JsonIgnore
  @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  private Date updatedAt;
  private int timeLimit;

  @TableLogic
  @JsonIgnore
  private Boolean isDeleted;

}
